import {connect}from 'react-redux'
import Topay from '../ui/topay'
// import {setshopinfo} from '../actioncreater/shangpinxqCreater'
const mapStateToProps=(state)=>{
    return {
      shopinfo:state.cartReducer.currentshopinfo,
      currentshoplist:state.cartReducer.currentshoplist,
      currentshoptotal:state.cartReducer.currentshoplist.reduce((sum,val)=>{if(val.price==0){return sum}else{return sum+=val.num*val.price}},0),
      defaultaddress:state.cartReducer.defaultaddress
    }
}
const mapDispatchToProps=(dispatch)=>{
    return {
        
       
    }
}
export default connect(mapStateToProps,mapDispatchToProps)(Topay)